Optimal. Leaf size=38 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a+a \sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3874, 3855,
3879} \begin {gather*} \frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a \sec (c+d x)+a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3874
Rule 3879
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \sec (c+d x) \, dx}{a}-\int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(109\) vs. \(2(38)=76\).
time = 0.19, size = 109, normalized size = 2.87 \begin {gather*} -\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (\cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )\right )}{a d (1+\sec (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 46, normalized size = 1.21
method | result | size |
derivativedivides | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(46\) |
default | \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d a}\) | \(46\) |
risch | \(-\frac {2 i}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a d}\) | \(65\) |
norman | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}}{\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}\) | \(93\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 75, normalized size = 1.97 \begin {gather*} \frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.71, size = 65, normalized size = 1.71 \begin {gather*} \frac {{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 54, normalized size = 1.42 \begin {gather*} \frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.65, size = 31, normalized size = 0.82 \begin {gather*} \frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________